Skip to content

Fix RPATH wrapper by detecting & replacing -Xlinker --enable-new-dtags#4970

Merged
boegel merged 4 commits intoeasybuilders:developfrom
lorisercole:fix/rpath-intel
Aug 12, 2025
Merged

Fix RPATH wrapper by detecting & replacing -Xlinker --enable-new-dtags#4970
boegel merged 4 commits intoeasybuilders:developfrom
lorisercole:fix/rpath-intel

Conversation

@lorisercole
Copy link
Contributor

Fix #4969 RPATH wrapper: detect and replace -Xlinker --enable-new-dtags

The linker flag -Xlinker --enable-new-dtags was not detected by the rpath_args.py script, causing the use of RUNPATH instead of RPATH in some cases.
In particular, this happened with Intel MPI compiler wrappers (e.g. mpiicpc), that always add --Xlinker --enable-new-dtags to the compilation command.

I also added some minor improvements to the script.

…-enable-new-dtags`

The linker flag `-Xlinker --enable-new-dtags` was not detected by the `rpath_args.py`
script, causing the use of RUNPATH instead of RPATH in some cases.
In particular, this happened with Intel MPI compiler wrappers (mpiicpc), that always add
`--Xlinker --enable-new-dtags` to the compilation command.
@boegel boegel added the bug fix label Aug 8, 2025
@boegel boegel changed the title Fix RPATH wrapper Fix RPATH wrapper by detecting & replacing -Xlinker --enable-new-dtags Aug 8, 2025
@boegel boegel added this to the next release (5.1.2) milestone Aug 8, 2025
Co-authored-by: Kenneth Hoste <kenneth.hoste@ugent.be>
@lorisercole
Copy link
Contributor Author

Just thinking, perhaps we can extend this PR to also address this issue:
easybuilders/easybuild-easyconfigs#23031 – RPATH wrapper with Intel compiler -c and -Werror flags leads to compilation errors

As @Micket commented easybuilders/easybuild-easyconfigs#23031 (comment) , is there a reason to add RPATHs flags when the compiler is invoked with -c?

@Thyre
Copy link
Collaborator

Thyre commented Aug 12, 2025

Just thinking, perhaps we can extend this PR to also address this issue: easybuilders/easybuild-easyconfigs#23031 – RPATH wrapper with Intel compiler -c and -Werror flags leads to compilation errors

As Micket commented easybuilders/easybuild-easyconfigs#23031 (comment) , is there a reason to add RPATHs flags when the compiler is invoked with -c?

We should address this, as this causes issues with at least Intel + Meson (like I also just commented in that issue). However, I think we should handle this in a separate, focused, PR.

Copy link
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@boegel
Copy link
Member

boegel commented Aug 12, 2025

Just thinking, perhaps we can extend this PR to also address this issue: easybuilders/easybuild-easyconfigs#23031 – RPATH wrapper with Intel compiler -c and -Werror flags leads to compilation errors
As Micket commented easybuilders/easybuild-easyconfigs#23031 (comment) , is there a reason to add RPATHs flags when the compiler is invoked with -c?

We should address this, as this causes issues with at least Intel + Meson (like I also just commented in that issue). However, I think we should handle this in a separate, focused, PR.

Fully agreed, smaller focused PRs are easier to review/merge

@boegel boegel merged commit 2e8e559 into easybuilders:develop Aug 12, 2025
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RPATH wrapper does not replace -Xlinker --enable-new-dtags flags

3 participants